package com.snail.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.snail.model.pojo.study.BizCourseVideoLike;

/**
 * @Author 极光x
 * @Date 2025/8/13 11:42
 * @Author yangming
 * @Description 针对表【Biz_course_video_like(点赞表)】的数据库操作Service
 **/
public interface BizCourseVideoLikeService extends IService<BizCourseVideoLike> {
    // 点赞操作(先存Redis)
    void like(Long userId, Long courseVideoId);

    // 取消点赞(先存Redis)
    void cancelLike(Long userId, Long courseVideoId);

    // 定时同步Redis数据到MySQL
    void syncLikeToDb();
    // 获取视频点赞数
    Long getLikeCount(Long courseVideoId);
    // 新增：查询用户是否已点赞
    boolean hasLiked(Long userId, Long courseVideoId);
}
